﻿namespace sieve
{
    internal class Program
    {
        static void Main(string[] args)
        {
            bool[] isPrime = new bool[101];
            for (int i = 0; i <= 100; ++i) isPrime[i] = true;
            
            for (int i = 2; i * i <= 100; ++i)
            {
                if (isPrime[i])
                {
                    for (int j = i * i; j <= 100; j += i) isPrime[j] = false;
                }
            }

            List<int> primes = new List<int>();
            for (int i = 2; i <= 100; ++i)
            {
                if (isPrime[i]) primes.Add(i);
            }
            Console.WriteLine(string.Join(", ", primes));
        }
    }
}